import os
import pandas as pd
import matplotlib.pyplot as plt
import sys
import shutil

# get the directory from command-line argument
directory = sys.argv[1]
destination_directory = sys.argv[2]

file = 'exp1_filtered_main_align_names.csv'
df_filtered = pd.read_csv(file)

# iterate over the filtered files and copy them to the new directory
for filename in df_filtered['Filename']:
    shutil.copy(os.path.join(directory, filename), destination_directory)